/*
Copyright 2022 The Numaproj Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// Code generated by Openapi Generator. DO NOT EDIT.

#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct VertexLimits {
    /// BufferMaxLength is used to define the max length of a buffer. It overrides the settings from pipeline limits.
    #[serde(rename = "bufferMaxLength", skip_serializing_if = "Option::is_none")]
    pub buffer_max_length: Option<i64>,
    /// BufferUsageLimit is used to define the percentage of the buffer usage limit, a valid value should be less than 100, for example, 85. It overrides the settings from pipeline limits.
    #[serde(rename = "bufferUsageLimit", skip_serializing_if = "Option::is_none")]
    pub buffer_usage_limit: Option<i64>,
    #[serde(rename = "rateLimit", skip_serializing_if = "Option::is_none")]
    pub rate_limit: Option<Box<crate::models::RateLimit>>,
    /// Read batch size from the source or buffer. It overrides the settings from pipeline limits.
    #[serde(rename = "readBatchSize", skip_serializing_if = "Option::is_none")]
    pub read_batch_size: Option<i64>,
    #[serde(rename = "readTimeout", skip_serializing_if = "Option::is_none")]
    pub read_timeout: Option<kube::core::Duration>,
}

impl VertexLimits {
    pub fn new() -> VertexLimits {
        VertexLimits {
            buffer_max_length: None,
            buffer_usage_limit: None,
            rate_limit: None,
            read_batch_size: None,
            read_timeout: None,
        }
    }
}
